package com.benyanyi.okhttp.util;

import android.util.Log;

/**
 * @author myLove
 */
public class OkHttpLog {

    private static boolean isLOG = true;

    private static String TAG = "OkHttpUtil--->>>>";

    public static void init(String tag) {
        TAG = tag;
    }

    public static void init(Boolean isShow) {
        isLOG = isShow;
    }

    public static void init(Boolean isShow, String tag) {
        isLOG = isShow;
        TAG = tag;
    }

    public static void d(Object object) {
        if (isLOG && object != null) {
            Log.d(TAG, object.toString());
        }
    }

    public static void e(Object object) {
        if (isLOG && object != null) {
            Log.e(TAG, object.toString());
        }
    }
}
